<template>
	<view class="content">
		<view class="list" v-if="list.length>0">
			
		</view>
		<view class="no-data" v-if="list.length == 0">
			<uni-icons custom-prefix="iconfont" type="icon-no-data" size="32" color="#999999"></uni-icons>
			<text class="text">暂无数据</text>
		</view>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				user:{},
				list: []
			}
		},
		created() {
			if(this.checkLogin()){
				// this.getCarouselList();
			}
		},
		onShow() {
			if(this.checkLogin()){
				
			}
			console.log(this.user)
		},
		onLoad() {
		
		},
		methods: {
			//登录状态检查
			checkLogin(){
				this.user = this.$store.getUser();
				if(this.user && this.user.id){
					return true;
				}else{
					uni.showToast({
						mask: true,
						title: '请先登录',
						icon: 'none'
					})
					uni.navigateTo({
						url: '/pages/login'
					})
					return false;
				}
			},

		}
	}
</script>

<style>
	.content {
		display: flex;
		flex-direction: column;
		align-items: center;
		justify-content: center;
	}

	.logo {
		height: 200rpx;
		width: 200rpx;
		margin-top: 200rpx;
		margin-left: auto;
		margin-right: auto;
		margin-bottom: 50rpx;
	}

	.text-area {
		display: flex;
		justify-content: center;
	}

	.title {
		font-size: 36rpx;
		color: #8f8f94;
	}
</style>
